const Joi = require("joi");

const username = Joi.string().pattern(/^[A-Za-z0-9\u4E00-\u9FA5\u3040-\u309F\u30A0-\u30FF\u31F0-\u31FF\uAC00-\uD7A3]+$/).min(1).max(10).required();
const password = Joi.string().pattern(/^\S*(?=\S{6,18})(?=\S*[A-Z])(?=\S*[a-z])\S*$/).required();
const email = Joi.string().email().required();
const code = Joi.string().required();

//管理员注册验证
exports.add_Schema = {
	body: {
		username,
		password,
		email,
		code,
	}
};